package com.app.backend.base.entity;

import com.app.backend.common.base.BaseEntity;
import com.app.backend.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @program: Permission
 * @description:
 * @author: Zhun.Xiao
 * @create: 2020-02-08 14:30
 **/
@Data
@Entity
@Table(name = "sys_permission")
@ApiModel(value = "权限")
public class Permission extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 权限类型 0-菜单 1-按钮 默认0
     */
    @ApiModelProperty(value = "权限类型")
    private Integer type = CommonConstant.PERMISSION_TYPE_URL;

    /**
     * 权限英文编码
     */
    @ApiModelProperty(value = "权限英文编码")
    private String code;
    @ApiModelProperty(value = "权限中文名")
    private String name;

    /**
     * 父节点id
     */
    @ApiModelProperty(value = "权限父id")
    private String parentId;

    /**
     * 是否根节点 0-否 1-是 默认0
     */
    @ApiModelProperty(value = "是否根节点 0-否 1-是 默认0")
    private Integer root = CommonConstant.PERMISSION_ROOT_FALSE;

    /**
     * 状态 0-正常 1-不可用 默认0
     */
    @ApiModelProperty(value = "状态 0-正常 1-不可用 默认0")
    private Integer status = CommonConstant.PERMISSION_STATUS_NORMAL;

    /**
     * 序列 排序用
     */
    @ApiModelProperty(value = "序列 排序用")
    private BigDecimal seq;

    /**
     * 图标 url
     */
    @ApiModelProperty(value = "图标 url")
    private String icon;

    /**
     * 权限url
     */
    @ApiModelProperty(value = "权限url")
    private String url;
}